package com.example.demo.controller;

import com.example.demo.entity.Course;
import com.example.demo.entity.Source;
import com.example.demo.mapper.CourseAvgMapper;
import com.example.demo.mapper.GpaMapper;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/getCourseAvg")
@CrossOrigin
public class CourseAvgController {

    @Resource
    CourseAvgMapper courseAvgMapper;

    @GetMapping("/getDashujuCourse")
    public List<Course> getDashujuCourse() {
        List<Course> courseList = courseAvgMapper.getDashujuCourse();
        return courseList;
    }

    @GetMapping("/getJisuanjiyingyongCourse")
    public List<Course> getJisuanjiyingyongCourse() {
        List<Course> courseList = courseAvgMapper.getJisuanjiyingyongCourse();
        return courseList;
    }

    @GetMapping("/getRuanjiangongchengCourse")
    public List<Course> getRuanjiangongchengCourse() {
        List<Course> courseList = courseAvgMapper.getRuanjiangongchengCourse();
        return courseList;
    }

    @GetMapping("/getRuanjianjishuCourse")
    public List<Course> getRuanjianjishuCourse() {
        List<Course> courseList = courseAvgMapper.getRuanjianjishuCourse();
        return courseList;
    }
    @GetMapping("/getWangluogongchengCourse")
    public List<Course> getWangluogongchengCourse() {
        List<Course> courseList = courseAvgMapper.getWangluogongchengCourse();
        return courseList;
    }

    @GetMapping("/getWangluojishuCourse")
    public List<Course> getWangluojishuCourse() {
        List<Course> courseList = courseAvgMapper.getWangluojishuCourse();
        return courseList;
    }

    @GetMapping("/getWulianwangCourse")
    public List<Course> getWulianwangCourse() {
        List<Course> courseList = courseAvgMapper.getWulianwangCourse();
        return courseList;
    }

    @GetMapping("/getXinxiguanliCourse")
    public List<Course> getXinxiguanliCourse() {
        List<Course> courseList = courseAvgMapper.getXinxiguanliCourse();
        return courseList;
    }

}
